package com.travelgroup.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.travelgroup.enums.PayStatus;
import com.travelgroup.enums.PayType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "支付订单")
public class PaymentOrder {
    @TableId(type = IdType.AUTO)
    @Schema(description = "订单主键id")
    private Long id;
    @Schema(description = "订单号")
    private String orderNo;
    @Schema(description = "平台订单号")
    private String tradeNo;
    @Schema(description = "用户id")
    private Long userId;
    @Schema(description = "拼团id")
    private Long groupId;
    @Schema(description = "支付金额")
    private BigDecimal amount;
    @Schema(description = "支付状态(0-待支付，1-支付成功，2-支付失败，3-已退款)")
    private PayStatus status;
    @Schema(description = "支付类型(1-支付宝，2-微信)")
    private PayType paymentType;
    @Schema(description = "支付时间")
    private Date paymentTime;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private Boolean deleted;
}
